<?php
$wxInfo = $data['wxInfos'];
$categories = $data['categories'];
?>
<div class="content">
	<form method="post" action="<?=n_url('weixin', 'doUpdateCategory')?>">
	<dl class="n-form">
		<dt>微信号：</dt>
		<dd><input type="text" name="wxid" value="<?=$wxInfo['wxid']?>" readonly></dd>
		<dt>微信名：</dt>
		<dd><input type="text" value="<?=$wxInfo['wxname']?>" readonly></dd>
		<dt>分类：</dt>
		<dd>
			<?php
			foreach($categories as $key=>$val){
				$cate[$val['first_category']][$val['second_category']] = $val['id'];
			}
			?>
			<?php
			foreach($cate as $key=>$val){
				?>
				<div>【<?=$key?>】</div>
				<?php
				foreach($val as $key1=>$val1){
					?>
					<div style="display: inline-block;width:120px;">
						<input type="radio" name="cid" value="<?=$val1?>" <?=$wxInfo['sid'] == $val1 ? 'checked' : ''?> />
						<?=$key1?>
					</div>
					
					<?php
				}
				?>
				
				<?php
			}
			?>
		</dd>
		<!--dt>描述：</dt>
		<dd>
			<textarea readonly><?=$wxInfo['description']?></textarea>
			</dd>
		<dt>认证：</dt>
		<dd>
			<textarea readonly><?=$wxInfo['auth']?></textarea>
			</dd-->
		<dt>&nbsp;</dt>
		<dd>
			<button>提交</button>
		</dd>
	</dl>
	</form>
</div>